Skip to content

T6962: frr: fix wrong kernel routes updates - #1029

Merged
dmbaturin merged 1 commit into
vyos:currentfrom
hedrok:T6962-frr-zebra-kernel-routes
Sep 16, 2025
Merged

T6962: frr: fix wrong kernel routes updates#1029
dmbaturin merged 1 commit into
vyos:currentfrom
hedrok:T6962-frr-zebra-kernel-routes

Conversation

@hedrok

@hedrok hedrok commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

FRR: Fix wrong kernel routes updates

The patch 0007-zebra-remove-kernel-route-on-last-address-deletion.patch fixes root cause of the issue: Zebra didn't do anything on last IPv4 address deletion though kernel in such case deletes all IPv4 routes.

FRR PR: FRRouting/frr#19564

I'm pretty confident in the patch, I've added topotest case, PR passed almost all topotests (I've checked that failed ones fail in other PRs as well and they really seem to have nothing to do with my changes).

As the issue is non-critical we can wait for FRR reaction to be sure not to break something.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@github-actions

github-actions Bot commented Sep 15, 2025

Copy link
Copy Markdown

👍
No issues in PR Title / Commit Title

@github-actions github-actions Bot added the current VyOS rolling release label Sep 15, 2025
@sever-sever
sever-sever requested a review from Copilot September 15, 2025 08:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where FRR (Free Range Routing) incorrectly handles kernel route updates when the last IPv4 address is deleted from an interface. The Linux kernel deletes IPv4 routes when the last interface IPv4 address is removed but doesn't send RTM_DELROUTE notifications, causing FRR's routing table to become out of sync with the kernel.

Key changes:

  • Adds new enum value RIB_UPDATE_KERNEL_LAST_ADDRESS_DELETED for tracking last address deletion events
  • Implements function if_has_connected_with_family() to check for addresses of a specific family on an interface
  • Updates route handling logic to properly detect and handle last IPv4 address deletion scenarios

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sever-sever sever-sever left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix for zebra to for updated kernel routes

The patch 0007-zebra-remove-kernel-route-on-last-address-deletion.patch
fixes root cause of the issue: Zebra didn't do anything on last
IPv4 address deletion though kernel in such case deletes all IPv4
routes.

FRR PR: FRRouting/frr#19564
@hedrok
hedrok force-pushed the T6962-frr-zebra-kernel-routes branch from 8f78735 to 4fbffe2 Compare September 15, 2025 08:35
@hedrok hedrok changed the title T6962: frr: fir wrong kernel routes updates T6962: frr: fix wrong kernel routes updates Sep 15, 2025

@dmbaturin dmbaturin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust Kyrylo's and Viacheslav's judgement and the code looks good to me.

@dmbaturin
dmbaturin merged commit d7c3843 into vyos:current Sep 16, 2025
8 checks passed
@vyosbot vyosbot added mirror-initiated This PR initiated for mirror sync workflow mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels Sep 16, 2025
@hedrok
hedrok deleted the T6962-frr-zebra-kernel-routes branch January 21, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

current VyOS rolling release mirror-completed

Development

Successfully merging this pull request may close these issues.

5 participants